﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DentistApplication
{
    public partial class TreatmentWindow : Form
    {
        List<string> chosenTeeth;
        public TreatmentWindow(List<string> chosenTeeth)
        {
            InitializeComponent();
            this.chosenTeeth = chosenTeeth;
            chosenTeeth.ForEach(a => box_notatki.Text += a + "\r\n");
        }

        private void bt_ogolna_Click(object sender, EventArgs e)
        {
            string[] ls = DatabaseHandler.getGroupServiceTypes(bt_ogolna.Text.ToString()).ToArray();
            ListV_services.Items.AddRange(ls);
        }

        private void bt_zachowawcza_Click(object sender, EventArgs e)
        {
            string[] ls = DatabaseHandler.getGroupServiceTypes(bt_zachowawcza.Text.ToString()).ToArray();
            ListV_services.Items.AddRange(ls);
        }

        private void bt_chirurgia_Click(object sender, EventArgs e)
        {
            string[] ls = DatabaseHandler.getGroupServiceTypes(bt_chirurgia.Text.ToString()).ToArray();
            ListV_services.Items.AddRange(ls);
        }

        private void bt_rtg_Click(object sender, EventArgs e)
        {
            string[] ls = DatabaseHandler.getGroupServiceTypes(bt_rtg.Text.ToString()).ToArray();
            ListV_services.Items.AddRange(ls);
        }

        private void bt_protetyka_Click(object sender, EventArgs e)
        {
            string[] ls = DatabaseHandler.getGroupServiceTypes(bt_protetyka.Text.ToString()).ToArray();
            ListV_services.Items.AddRange(ls);
        }

        private void bt_ortodoncja_Click(object sender, EventArgs e)
        {
            string[] ls = DatabaseHandler.getGroupServiceTypes(bt_ortodoncja.Text.ToString()).ToArray();
            ListV_services.Items.AddRange(ls);
        }

        private void bt_apply_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void TreatmentWindow_Load(object sender, EventArgs e)
        {

        }



    }
}
